package cn.modfun.web.core.interceptor;


import cn.hutool.core.exceptions.ExceptionUtil;
import cn.modfun.web.core.controller.BaseController;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

public class ExceptionInterceptor implements Interceptor {


	@Override
	public void intercept(Invocation inv) {
		BaseController controller = (BaseController)inv.getController();  
        try{
        	inv.invoke();
        }catch(Exception e){
            System.out.println(ExceptionUtil.getMessage(e));
            e.printStackTrace();
            throw e;
        }
	}

	
}
